<?php

App::import('Controller', 'Admin');
class AuController extends AdminController {

    /**
     * login
     * @return type 
     */
    public function index() {
        $this->layout = false;
        if ($this->request->is('post')) {
            if ($this->Auth->login()) {
                return $this->redirect($this->Auth->redirect());
            }
            $this->Session->setFlash(__('Invalid username or password'), 'alert', array(
                'plugin' => 'BoostCake',
                'class' => 'alert-danger'
            ));
        }
    }
    
    /**
     * logout
     * 
     */
    public function logout(){
        return $this->redirect($this->Auth->logout());
    }
    
    

}